'use strict';

/**
 * @ngdoc directive
 * @name webApp.directive:uiCommunicate
 * @description
 * # uiCommunicate
 */

angular.module('webApp')
  .directive('uiCommunicate', function (cookie) {
  return {
    templateUrl: 'views/uiCommunicate.html',
    restrict: 'AE',
    replace: false,
    scope: {
      userCommunicateData: '=userCommunicateData'
    },
    compile: function(tele,tattr){
      return{
        pre: function($scope,tele,tattr){

        },
        post: function($scope,iele,iattr){
          $scope.setId = function(id){
            cookie.setCookie('newsId',id);
          };
        }
      }
    }
  };
});
